<template>
  <div class="lecturer-Info clear">
    <div class="result-list">
      <div class="item">
        <div class="flex-name clear">
          <img :src="info.img" alt="">
          <div class="name-info">
            <p class="name">{{info.truename}}</p>
            <p class="info">{{info.title}}</p>
          </div>
        </div>
        <div class="honor">
          <p class="title">资质荣誉</p>
          <div v-html="info.honour"></div>
        </div>
      </div>
      <div class="item pb0">
        <p class="type-name">讲师介绍</p>
        <div class="work" v-html="info.introduce">
          
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import {lecturerInfo} from '@/api/api'
  import { commonShare } from "@/config/wxshare"

  export default {
    components: {
    },
    data () {
      return {
        info:[],
      }
    },
    created () {
      this.id = this.$route.query.id,
      this.lecturer()
    },
    methods: {
      lecturer () {
        lecturerInfo(this.id).then((res) =>{
          this.info=res.data.data
          commonShare(this.info.img, '智慧宝名师-'+this.info.truename, this.info.title);
        }).catch((err) => {
          console.dir(err)
        })
      }
    }
  }
</script>

<style lang="stylus" scoped>
.lecturer-Info
  min-height 100vh
  min-width 100vw
  background-color #f5f5f5
  .result-list
    padding-top 2rem
    background-image url('../../assets/jiangshijieshao01.png')
    background-repeat no-repeat
    background-size 100%
    width 100%
    .item
      width 92%
      margin-left 4%
      border-radius .3rem
      background-color #fff
      padding 2rem 1.6rem
      box-sizing border-box
      margin-bottom 1rem
      .flex-name
        padding-bottom 2rem
        border-bottom 1px solid #e6e6e6
        img
          width 5rem
          height 5rem
          overflow hidden
          border-radius 50%
          float left
          margin-right 1rem
        .name-info
          float left
          line-height 2.3rem
          .name
            font-size 1.7rem
            color #333
            font-weight bold
            margin-top .4rem
          .info
            font-size 1.2rem
            color #666
      .honor
        .title
          margin-bottom .8rem
          height 1.5rem
          line-height 1.5rem
          margin-top 1.8rem
          font-size 1.5rem
          font-weight 500
          color #333
        .cons
          font-size 1.2rem
          color #666
          line-height 2.1rem
      .type-name
        font-size 1.7rem
        height 1.7rem
        line-height 1.7rem
        font-weight 500
        position relative
        color #333
      .work
        margin-top 2.5rem
        overflow hidden
        .img
          position relative
          left 50%      
        .type-img
          width 28rem
          margin-left -14rem
          margin-bottom 2rem    
        .cons
          font-size 1.3rem
          color #666
          line-height 2.4rem
          margin-bottom 1.8rem
</style>
